Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

fix append empty role bug #1654

Merged
merged 3 commits into from
Aug 16, 2018
Merged

fix append empty role bug #1654

merged 3 commits into from
Aug 16, 2018

Conversation

vdrobnyi
Copy link
Contributor

Signed-off-by: Victor Drobny [email protected]

Description of the Change

It was impossible to add a role without permissions to account. Now it is possible.

Benefits

One small bug was fixed.

Signed-off-by: Victor Drobny <[email protected]>
@@ -396,7 +396,7 @@ namespace iroha {
SELECT CASE
WHEN EXISTS (SELECT * FROM inserted) THEN 0
%s
ELSE 5
ELSE 4
Copy link
Contributor

@igor-egorov igor-egorov Aug 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is absolutely unclear what are the magic numbers used :(
Even more - neither executor itself nor its methods do not have documentation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error codes concept is still in development as I understand, so this is internal API.

TEST_F(AppendRole, ValidAppendRoleTestWhenEmptyPerms) {
addAllPerms();
ASSERT_TRUE(val(execute(buildCommand(TestTransactionBuilder().createRole(
"role2", {})),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a const variable for "role2" string.

@igor-egorov igor-egorov self-requested a review August 15, 2018 13:33
Signed-off-by: Victor Drobny <[email protected]>
@@ -396,7 +396,7 @@ namespace iroha {
SELECT CASE
WHEN EXISTS (SELECT * FROM inserted) THEN 0
%s
ELSE 5
ELSE 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error codes concept is still in development as I understand, so this is internal API.

Signed-off-by: Victor Drobny <[email protected]>
@sorabot
Copy link

sorabot commented Aug 16, 2018

SonarQube analysis reported 1 issue

  1. MINOR postgres_executor_test.cpp#L99: The class 'RemoveSignatory' defines member variable with name 'pubkey' also defined in its parent class 'CommandExecutorTest'. rule

@vdrobnyi vdrobnyi merged commit 9db8ba2 into develop Aug 16, 2018
@vdrobnyi vdrobnyi deleted the fix/append-role-empty-perms branch August 16, 2018 08:49
bakhtin pushed a commit that referenced this pull request Nov 2, 2018
* fix append empty role bug

Signed-off-by: Victor Drobny <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants